import random
def generate_data(m, n):
    # 随机生成m个0~9范围内的数字，作为nums1
    nums1 = [random.randint(0, 9) for i in range(m)]
    # 随机生成n个0~9范围内的数字，作为nums2
    nums2 = [random.randint(0, 9) for i in range(n)]
    # 随机生成k，范围在1~max(m, n)
    k = random.randint(1, max(m, n))
    return nums1, nums2, k

def generate_test_cases():
    test_cases = [
        # 经典样例
        {"input": 3, "output": ["((()))", "(()())", "(())()", "()(())", "()()()"]},
        # 只有一个括号
        {"input": 1, "output": ["()"]},
        # 两对括号
        {"input": 2, "output": ["", "(())", "()()"]}
    ]
    return test_cases

def generate_test_cases():
    test_cases = [
        # 经典样例1
        {
            "input": [createLinkedList([1,4,5]), createLinkedList([1,3,4]), createLinkedList([2,6])],
            "output": [1, 1, 2, 3, 4, 4, 5, 6],
        },
        # 边界样例1
        {
            "input": [createLinkedList([]), createLinkedList([1])],
            "output": [1],
        },
        # 边界样例2
        {
            "input": [],
            "output": None,
        },
    ]
    return test_cases

num = "".join([str(random.randint(0, 9)) for _ in range(random.randint(1, 10))])



def generate_tree() -> TreeNode:
     if random.random() < 0.5:
         return None
     val = random.randint(-100, 100)
     left = generate_tree()
     right = generate_tree()
     return TreeNode(val, left, right)

 root = generate_tree()

target_sum = random.randint(-1000, 1000)



m, n = random.randint(1, 10), random.randint(1, 10)
grid = [[random.randint(1, 10) for _ in range(n)] for _ in range(m)]
=======
#贪心算法：[135. 分发糖果]
import random
if __name__ == '__main__':
    # 生成随机测试数据
    ratings = [random.randint(1, 100) for _ in range(10)]

#回溯算法：[51. N 皇后]
import random
if __name__ == '__main__':
    # 生成随机测试数据
    n = random.randint(1, 10)

#贪心算法：[406.根据身高重建队列]
import random
if __name__ == '__main__':
    # 生成随机测试数据
    n = random.randint(1, 10)
    people = [[random.randint(1, 100), random.randint(0, n-1)] for _ in range(n)]
